/*
* @author : TF-BJ-C064
* @creation : 2014-6-9 下午5:51:17
* @description : 
*
*/

package com.base;

import com.bean.ParkManager;
import com.bean.SysUser;

public class UserBean implements java.io.Serializable  {
	
	/** serialVersionUID*/
	private static final long serialVersionUID = -8980907455387079956L;
	
	private Long 	id;
	private String 	userCode;
	private String 	userName;
	private String 	userPasswd;
	private String 	userPhoto;
	private Long 	role;
	private String 	roleName;
	private String  ip;
	private short 	status;
	private String 	statusName;
	
	public static Long 	MAX_PARK_ROLE_ID = 10L;
	
	public void setUser(SysUser user){
		this.setId(user.getSysUserId());
		this.setUserCode( user.getUserName() );
		this.setUserName( user.getRealName() );
		this.setUserPasswd(user.getUserPasswd());
		this.setUserPhoto( user.getPhoto() );
		this.setRole(user.getRole());
		this.setRoleName(user.getRoleName());
	}
	
	public void setUser(ParkManager user){
		this.setId(user.getUserId());
		this.setUserCode( user.getUserName() );
		this.setUserName( user.getRealName() );
		this.setUserPasswd(user.getUserPasswd());
		this.setUserPhoto( user.getPhoto() );
		this.setRole(new Long(user.getRole()));
		this.setRoleName(user.getRoleName());
	}
	
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}
	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	/**
	 * @return the userPhoto
	 */
	public String getUserPhoto() {
		return userPhoto;
	}
	/**
	 * @param userPhoto the userPhoto to set
	 */
	public void setUserPhoto(String userPhoto) {
		this.userPhoto = userPhoto;
	}
	/**
	 * @return the role
	 */
	public Long getRole() {
		return role;
	}
	/**
	 * @param role the role to set
	 */
	public void setRole(Long role) {
		this.role = role;
	}
	/**
	 * @return the roleName
	 */
	public String getRoleName() {
		return roleName;
	}
	/**
	 * @param roleName the roleName to set
	 */
	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	/**
	 * @return the ip
	 */
	public String getIp() {
		return ip;
	}
	/**
	 * @param ip the ip to set
	 */
	public void setIp(String ip) {
		this.ip = ip;
	}
	/**
	 * @return the status
	 */
	public short getStatus() {
		return status;
	}
	/**
	 * @param status the status to set
	 */
	public void setStatus(short status) {
		this.status = status;
	}
	/**
	 * @return the statusName
	 */
	public String getStatusName() {
		return statusName;
	}
	/**
	 * @param statusName the statusName to set
	 */
	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	/**
	 * @return the userPasswd
	 */
	public String getUserPasswd() {
		return userPasswd;
	}

	/**
	 * @param userPasswd the userPasswd to set
	 */
	public void setUserPasswd(String userPasswd) {
		this.userPasswd = userPasswd;
	}

	/**
	 * @return the userCode
	 */
	public String getUserCode() {
		return userCode;
	}

	/**
	 * @param userCode the userCode to set
	 */
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}

}
